# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=perl-text-csv
_pkgname=Text-CSV
pkgver=2.00
pkgrel=0
pkgdesc="Manipulate comma-separated value strings"
url="https://metacpan.org/release/Text-CSV"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
makedepends="perl-dev"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/Text-CSV-$pkgver.tar.gz"

builddir="$srcdir/$_pkgname-$pkgver"

build() {
	cd "$builddir"
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	cd "$builddir"
	make test
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	find "$pkgdir" -name '.packlist' -delete
	find "$pkgdir" -name '*.pod' -delete
}

sha512sums="ac41e8e1a56f30eac9076e8c53584186df83e4b1bf32ac52aef862ff7a02ada2801df2eac710b89e06901342c8513844d3dbbc86fc53d7a3d3da5f91f69dd88f  Text-CSV-2.00.tar.gz"
